/***********************************************************************
filename: 	EP3DTriangle2.h
created:	10/2/2009
author:		Hongjiang Zhang
Email:		chrisntywyat@163.com

purpose:	
*************************************************************************/
#ifndef EP3D_TRIANGLE2_H
#define EP3D_TRIANGLE2_H
#include "EP3DBase.h"
#include "EP3DVector2.h"

namespace EP3D
{
	template<class T>
	class Triangle2
	{
	public:
		Triangle2();
		Triangle2(const Vector2<T>& rkV0, const Vector2<T>& rkV1, const Vector2<T>& rkV2);
		Triangle2(const Vector2<T> akV[3]);
	public:
		Vector2<T> m_rkPoint[3];
	};

	template<class T>
	Triangle2<T>::Triangle2()
	{}

	template<class T>
	Triangle2<T>::Triangle2(const Vector2<T> &rkV0, const Vector2<T> &rkV1, const Vector2<T> &rkV2)
	{
		m_rkPoint[0] = rkV0;
		m_rkPoint[1] = rkV1;
		m_rkPoint[2] = rkV2;
	}

	template<class T>
	Triangle2<T>::Triangle2(const Vector2<T> akV[3])
	{
		m_rkPoint[0] = akV[0];
		m_rkPoint[1] = akV[1];
		m_rkPoint[2] = akV[2];
	}

	typedef Triangle2<f32> Triangle2f;
	typedef Triangle2<f64> Triangle2d;

}
#endif